var orders;

$(function(){

	init_page();

});

function Orders(){

	var me = this;
	
}

function init_page(){

	$("#inp-find-by-phone").typeahead({
		source: function(query, process) {
	        return $.ajax({
	            url: $(this)[0].$element[0].dataset.link,
	            type: 'post',
	            data: Request.Make('customer', 'find_by_phone', query),
	            dataType: 'json',
	            success: function(json) {
	                return typeof json.options == 'undefined' ? false : process(json.options);
	            }
	        });
	    }
	});
}